﻿package com.STS.ELearning.Captivate.events{
	
	import flash.events.Event;
	import com.STS.ELearning.Captivate.QuizData;
	
	
	public class WidgetEvent extends Event {
		
		
		public static const ENTER_RUNTIME:String = "enterRuntime";
		public static const INTERACTIVE_ITEM_SUBMITTED:String = "interactiveItemSubmitted";
		public static const ENTER_MOVIE:String = "enterMovie";
		public static const MOVIE_ENDED:String = "movieEnded";
		public static const ENTER_SLIDE:String = "enterSlide";
		public static const EXIT_SLIDE:String = "exitSlide";
		public static const PAUSE:String = "pause";	
		public static const RESUME:String = "resume";
		
		private var _frameNumber:Number;
		private var _slideNumber:Number;
		private var _slideLabel:String;
		private var _isActOfUser:Boolean;
		private var _quizData:QuizData;
		
		
		
		public function WidgetEvent (type:String, bubbles:Boolean = false, 
									 cancelable:Boolean = false, frameNumber:Number = NaN, 
									 slideNumber:Number = NaN, slideLabel:String = null,
									 isActOfUser:Boolean = false, quizData:QuizData = null) {
			_frameNumber = frameNumber;
			_slideNumber = slideNumber;
			_slideLabel = slideLabel;
			_isActOfUser = isActOfUser;
			_quizData = quizData;
			
			super(type, bubbles, cancelable);
		}
		
		override public function clone():Event {
			return new WidgetEvent(type, bubbles, cancelable, _frameNumber, _slideNumber, _slideLabel);
		}
		
		public function get frameNumber():Number { return _frameNumber; }
		
		
		public function get slideNumber():Number { return _slideNumber; }
		
		public function get slideLabel():String { return _slideLabel; }
		
		//eventin kaybağı kullanıcı mı
		public function get isActOfUser():Boolean { return _isActOfUser; }
		
		
		public function get quizData():QuizData { return _quizData; }
		
	}
	
}